﻿#pragma once
#include "GameplayTagContainer.h"
#include "StarrySkyAbilityTypes.generated.h"
class UAbilitySystemComponent;
class UGameplayEffect;

/**
 * 自定一伤害效果结参数构体
 **/
USTRUCT(BlueprintType)
struct FDamageEffectParams
{
	GENERATED_BODY()
	FDamageEffectParams(){}

	// 游戏效果上下文
	UPROPERTY(BlueprintReadWrite)
	TObjectPtr<UObject> WorldContextObject = nullptr;

	//伤害的游戏效果类
	UPROPERTY(BlueprintReadWrite)
	TSubclassOf<UGameplayEffect> DamageGameplayEffectClass = nullptr;

	//伤害源的能力系统组件
	UPROPERTY(BlueprintReadWrite)
	TObjectPtr<UAbilitySystemComponent> SourceAbilitySystemComponent;

	//伤害目标的能力系统组件
	UPROPERTY(BlueprintReadWrite)
	TObjectPtr<UAbilitySystemComponent> TargetAbilitySystemComponent;

	//基础伤害能力造成的伤害
	UPROPERTY(BlueprintReadWrite)
	float BaseDamage = 0.f;

	//造成伤害的能力等级
	UPROPERTY(BlueprintReadWrite)
	float AbilityLevel = 1.f;

	//伤害类型
	UPROPERTY(BlueprintReadWrite)
	FGameplayTag DamageType = FGameplayTag();

	//Debuff生效几率
	UPROPERTY(BlueprintReadWrite)
	float DebuffChance = 0.f;

	//Debuff产生的伤害
	UPROPERTY(BlueprintReadWrite)
	float DebuffDamage = 0.f;

	//Debuff持续时间
	UPROPERTY(BlueprintReadWrite)
	float DebuffDuration = 0.f;

	//Debuff产生频率每秒执行的次数
	UPROPERTY(BlueprintReadWrite)
	float DebuffFrequency = 0.f;

	//死亡时，被击退的力
	UPROPERTY(BlueprintReadWrite)
	float DeathImpulseMagnitude = 0.f;

	//死亡时，死亡冲力向量
	UPROPERTY(BlueprintReadWrite)
	FVector DeathImpulse = FVector::ZeroVector;

	//击中时的击退属性
	UPROPERTY(BlueprintReadWrite)
	float KnockbackForceMagnitude = 0.f;
	//击退几率
	UPROPERTY(BlueprintReadWrite)
	float KnockbackChance = 0.f;
	//击退向量
	UPROPERTY(BlueprintReadWrite)
	FVector KnockbackForce = FVector::ZeroVector;

	//是否是辐射伤害
	UPROPERTY(BlueprintReadWrite)
	bool bIsRadialDamage = false;
	//辐射伤害内半径
	UPROPERTY(BlueprintReadWrite)
	float RadialDamageInnerRadius = 0.f;
	//辐射伤害外半径
	UPROPERTY(BlueprintReadWrite)
	float RadialDamageOuterRadius = 0.f;
	//辐射伤害的源点
	UPROPERTY(BlueprintReadWrite)
	FVector RadialDamageOrigin = FVector::ZeroVector;
};